package cn.jasonone.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.jasonone.bean.SysResource;

public interface SysResourceMapper {
	public int save(SysResource resource);

	public int deleteByIds(@Param("ids") int... ids);

	public List<SysResource> findAll(SysResource resource);

	public SysResource findById(@Param("id") int id);
	public List<SysResource> findByRoleId(@Param("roleId") int roleId);
	public List<SysResource> findByUserId(@Param("userId") int userId);
	
	public int deleteResourceBind(@Param("roleId")Integer roleId);
	
	public int addResourceBind(@Param("roleId")Integer roleId,@Param("resourceIds")int[] resourceIds);
}
